package com.tcd.policy.mapper;

import com.tcd.Policy.pojo.WarrantyInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 保单信息表 Mapper 接口
 * </p>
 *
 * @author cz
 * @since 2021-05-25
 */
public interface WarrantyInfoMapper extends BaseMapper<WarrantyInfo> {

    List<WarrantyInfo> getWarrantyInfo(@Param("pageIndex") Integer pageIndex,@Param("pageSize") Integer pageSize,@Param(value = "warrantyId") String warrantyId,@Param(value = "licenseId") String licenseId,@Param(value = "policyholderId") String policyholderId,@Param(value = "insuranceType") String insuranceType);

    int addWarrantyCompulsory(WarrantyInfo warrantyInfo);

    List<String> selectInsureRiskInfo(String warrantyId);

    //修改保单
    int updatePolicyByid(WarrantyInfo warrantyInfo);

    List<WarrantyInfo> getWarrantyInfoByauditStatus(@Param(value = "warrantyId") String warrantyId,@Param(value = "licenseId") String licenseId,@Param(value = "policyholderId") String policyholderId);

    //审核保单
    int updateAuditStatus(@Param(value = "auditStatus") String auditStatus,@Param(value = "warrantyId") String warrantyId);

    int updateaccidentsNumById(@Param(value = "warrantyId") String[] warrantyId);

    //查询保单总数
    Integer getWarrantyInfoCount(@Param(value = "warrantyId") String warrantyId,@Param(value = "licenseId") String licenseId,@Param(value = "policyholderId") String policyholderId);
}
